package com.zahb.qadx.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by： huwei.
 * Data： 2020-10-27.
 * Time： 10:12.
 * Desc：新闻导航
 */
public class CateNavigationModel {

    public static class NavigationData implements Parcelable {
        private int cateId;
        private int parentId;
        private int rootOrgId;
        private String cateName;
        private List<NavigationData> children;

        public int getCateId() {
            return cateId;
        }

        public void setCateId(int cateId) {
            this.cateId = cateId;
        }

        public int getParentId() {
            return parentId;
        }

        public void setParentId(int parentId) {
            this.parentId = parentId;
        }

        public int getRootOrgId() {
            return rootOrgId;
        }

        public void setRootOrgId(int rootOrgId) {
            this.rootOrgId = rootOrgId;
        }

        public String getCateName() {
            return cateName;
        }

        public void setCateName(String cateName) {
            this.cateName = cateName;
        }

        public List<NavigationData> getChildren() {
            return children;
        }

        public void setChildren(List<NavigationData> children) {
            this.children = children;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.cateId);
            dest.writeInt(this.parentId);
            dest.writeInt(this.rootOrgId);
            dest.writeString(this.cateName);
            dest.writeTypedList(this.children);
        }

        public NavigationData() {
        }

        protected NavigationData(Parcel in) {
            this.cateId = in.readInt();
            this.parentId = in.readInt();
            this.rootOrgId = in.readInt();
            this.cateName = in.readString();
            this.children = in.createTypedArrayList(NavigationData.CREATOR);
        }

        public static final Creator<NavigationData> CREATOR = new Creator<NavigationData>() {
            @Override
            public NavigationData createFromParcel(Parcel source) {
                return new NavigationData(source);
            }

            @Override
            public NavigationData[] newArray(int size) {
                return new NavigationData[size];
            }
        };
    }

    public static class NewsDataItem {
        private int id;
        private String title;
        private String content;
        private String coverPath;
        private String createTime;

        public String getCoverPath() {
            return coverPath;
        }

        public void setCoverPath(String coverPath) {
            this.coverPath = coverPath;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }
    }
}